﻿

using Assets.Scripts.DL.Consts;
using Assets.Scripts.DL.Mgrs;
using UnityEngine;

public class PlayerDie : PlayerBaseState {
	public PlayerDie(PlayerController controller, PlayerStateEnum stateName, State<PlayerStateEnum> superFSM, StateFactory<PlayerStateEnum> factory) : base(controller, stateName, superFSM, factory) {
		AddConditionToSelf(() => _controller.StateData.IsDie);
	}

	public override void Enter() {
		AudioManager.Play(_controller.Effect, AudioStr.PlayerDieAudio);
		_controller.Velocity = Vector2.zero;
		_controller.PlayAnim(PlayerStateEnum.Die);
	}

	public override void Exit() {
	}
}